import request from '@/router/axios';
// 获取合同列表
export const getContractList = (current, size, params) => {
  return request({
    url: '/api/blade-purchase/contractinfo/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 保存
export const save = (data) => {
  return request({
    url: '/api/blade-purchase/contractinfo/save',
    method: 'post',
    data: data
  })
}

// 删除
export const remove = (id) => {
  return request({
    url: '/api/blade-purchase/contractinfo/remove',
    method: 'post',
    params: {
      id
    }
  })
}

//查看
export const detail = (id) => {
  return request({
    url: '/api/blade-purchase/contractinfo/detail',
    method: 'get',
    params: {
      id
    }
  })
}

//审批
export const startProcess = (id) => {
  return request({
    url: '/api/blade-purchase/contractinfo/start-process',
    method: 'get',
    params: {
      id
    }
  })
}

//获取供应商
export const getSuppliers = () => {
  return request({
    url: '/api/blade-supplier-management/supplierprofile/supplierList',
    method: 'get'
  })
}

export const getNlNos = () => {
  return request({
    url: '/api/blade-purchase/rsnlinfo/rsnlList',
    method: 'get'
  })
}
